﻿#region

using System;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Mvc;
using log4net;
using xConnected.Common.Category;
using xConnected.Common.Country;
using xConnected.Common.ExpertProfile;
using xConnected.Service;

#endregion

namespace xConnected.Web.Controllers
{
    public class HomeController : Controller
    {
        private readonly CategoryService _categoryService;
        private readonly CountryService _countryService;
        private readonly EducationService _educationService;
        private readonly LanguageService _languageService;
        private readonly CompanyProfileService _companyService;
        private readonly TechnologyService _technologyService;
        private readonly UserService _userService;
        private readonly IndustryService _industryService;


        public HomeController(ExpertProfileService profileService,
                                         EducationService educationService,
                                         CountryService countryService,
                                         TechnologyService technologyService,
                                         CategoryService categoryService,
                                         UserService userService,
                                         LanguageService languageService,
                                         IndustryService industryService)
        {
            _educationService = educationService;
            _countryService = countryService;
            _technologyService = technologyService;
            _categoryService = categoryService;
            _userService = userService;
            _languageService = languageService;
            _industryService = industryService;
        }


        public ActionResult Index()
        {
            return View();
        }
       
      
        public ActionResult SetCulture(string id)
        {
            HttpCookie userCookie = Request.Cookies["Culture"];

            userCookie.Value = id;
            userCookie.Expires = DateTime.Now.AddYears(100);
            Response.SetCookie(userCookie);

            return Redirect(Request.UrlReferrer.ToString());
        }


        

       
    }
}